home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Alles Voor Internet / Tout Pour Internet
/
alles voor internet.iso
/
MacInternet™
/
Modem
/
ARA Scripts Map
/
ara-ur-rolmpbx-ex
/
ROLM->ROLM
< prev
next >
Wrap
Text File
|
1994-06-22
|
5KB
|
268 lines
! ROLM->ROLM
! ARA 1.0 driver for University of Rochester's ROLM PBX system
! script version 1.0.0 6/21/94
! Jonathan Taylor jtyr@troi.cc.rochester.edu
! (716) 275-8776
!
! This script allows connections between two Macintoshes connected to the ROLM WAN.
! It originates calls at a user specified speed (2400, 9600, 19200 bps) and auto
! answers at 2400, 9600, and 19200 bps.
!
! This set of scripts builds on the work of many other individuals. Kirk Anne of the
! Computing Center did pioneering work on the ROLM specific routines. John Todd
! working for Computer Sales as a student programer, further refined Kirk's drivers
! and created a solid script for calling into the University at 9600 bps. David
! Forero of the Psychology department has also been with the process from the very
! beginning. He has provided all of us with valuble insight and practical
! assistance.
!
! I've spent a great deal of time and effort adding the following capabilites:
! • multispeed answering in a single driver
! • multispeed call origination in a single driver
! • support for the Eastman ROLM server
! • outbound connections through either the old or the new high-speed
! modem pool
! • universal modem setup for the inbound driver
!
! Adding these capabilities required generation of new code and refinement
! of existing code. The ROLM->ROLM driver is revised version of Kirk Anne's
! original. The Hayes->ROLM driver is a wholecloth rewrite of John Todd's.
! The ROLM->Hayes driver is entirely my own.
!
! As soon as I get time I will update these drivers to take advantage of Remote
! Access 2.0 features.
!
! I wrote these drivers to make roving computing easier for myself. I am a database
! programer for the Facilities Department. Supporting communications and computing
! for the larger University is not my job. This said, I would love feed back on the
! performance of these drivers. I would prefer to correspond by e-mail. I will
! respond as my work load allows.
!
!
!
@ORIGINATE
jsr 90
jsr 93
jsr 20
note "Enter ROLM communications speed (bps)." 2
!
@LABEL 1 ! branch point for for speed routines
ask 0 "Speed (2400, 9600 or 19200 bps):"
write "^*\13"
matchclr
matchstr 1 30 "2400"
matchstr 2 32 "9600"
matchstr 3 34 "19200"
matchread 10
note "Invalid connection speed. Please re-enter." 2
jump 1
!
@ANSWER
jsr 90
jsr 93
!
@LABEL 8
jsr 20
!
@LABEL 9
note "Connected to ROLM. " 2
pause 5
ifANSWER 50
matchclr
matchstr 1 12 "CALL COMPLETE"
matchstr 2 101 "BUSY"
matchstr 3 10 "NOT A DATALINE"
matchstr 4 104 "DOES NOT ANSWER"
matchstr 5 105 "CONNECTION FAILED"
note "Dialing ^1." 3
write "CALL ^1\13"
matchread 500
jump 103
!
@LABEL 10
matchclr
matchstr 1 8 "CALL COMPLETE"
matchstr 2 102 "NOT A DATALINE"
matchstr 3 101 "BUSY"
matchstr 4 104 "DOES NOT ANSWER"
write "c campus\13"
matchread 500
jump 10
!
@LABEL 12
note "Connected to ^1." 2
!
@LABEL 13
pause 15
matchclr
settries 0
return
!
@LABEL 16
ifANSWER 17
pause 10
!
@LABEL 17
exit 0
!
@LABEL 20
note "Waiting for matched prompt." 2
settries 0
!
@LABEL 21
matchclr
matchstr 1 22 "CALL, DISPLAY OR MODIFY ?"
write "\13\13\13"
pause 5
matchread 50
inctries
iftries 3 103
jump 21
!
@LABEL 22
return
!
@LABEL 30 ! configure modem: 2400
note "Communicating at 2.4 kbps." 2
jsr 90
jsr 91
jsr 8
!
@LABEL 31
write "Q24\13"
matchstr 1 16 "R24"
inctries
iftries 32 100
matchread 10
matchclr
jump 31
!
@LABEL 32 ! configure modem: 9600
note "Communicating at 9.6 kbps." 2
jsr 90
jsr 92
jsr 8
!
@LABEL 33
write "Q96\13"
matchstr 1 16 "R96"
inctries
iftries 32 100
matchread 10
matchclr
jump 33
!
@LABEL 34 ! configure modem: 19200
note "Communicating at 19.2 kbps." 2
jsr 90
jsr 93
jsr 8
!
@LABEL 35
write "Q192\13"
matchstr 1 16 "R192"
inctries
iftries 32 100
matchread 10
matchclr
jump 35
!
! variable speed ANSWER routine
!
@LABEL 50
note "Answering ROLM calls..." 2
pause 30
write "M ANSWER AUTO\13"
pause 30
flush
jsr 90
!
@LABEL 60
setspeed 2400
matchclr
matchstr 1 70 "Q24"
matchread 8
!
@LABEL 62
setspeed 9600
matchclr
matchstr 1 72 "Q96"
matchread 8
!
@LABEL 64
setspeed 19200
matchclr
matchstr 1 74 "Q192"
matchread 8
jump 60
!
@LABEL 70
note "Answering ROLM call." 3
userhook 1
write "R24\13\10"
note "Connected at 2.4 kbps."
jump 16
!
@LABEL 72
note "Answering ROLM call." 3
userhook 1
write "R96\13\10"
note "Connected at 9.6 kbps."
jump 16
!
@LABEL 74
note "Answering ROLM call." 3
userhook 1
write "R192\13\10"
note "Connected at 19.2 kbps."
jump 16
!
! HANGUP routine
!
@HANGUP
jsr 90
jsr 93
exit 0
!
! serial setup
!
@LABEL 90
dtrclear
pause 7
dtrset
return
!
@LABEL 91
serreset 2400,0,8,1
return
!
@LABEL 92
serreset 9600,0,8,1
return
!
@LABEL 93
serreset 19200,0,8,1
return
!
! error codes
!
@LABEL 100 ! No APPLELISTEN on other end
exit -6022 "No reply. Check remote server setup."
!
@LABEL 101 !Busy
exit -6002 "^1 is busy or has an error."
@LABEL 102 ! Not a dataline
exit -6002 "^1 is not a dataline. Be sure you entered an internal extension without a dash."
@LABEL 103 ! Phone isn't working
exit -6002 "ROLM not responding. Check connections and dataline. Try again later."
@LABEL 104 ! No answer
exit -6002 "^1 does not answer. Check remote server setup."
@LABEL 105 ! Connection failed
exit -6002 "Connection failed. Be sure you entered an internal extension without a dash."
!
@LABEL 128
exit -6002 "Any old schlock."